package com.htu.courseService.websocket.chat;
import com.htu.courseService.websocket.chat.hanler.ChatAppHandler;
import com.htu.courseService.websocket.facotry.AppFactory;
import com.htu.courseService.websocket.facotry.CommonAppHandler;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Created By JNNarrator on 2024/9/22 02:30
 * email: jiangn09@chinatelecom.cn
 */
@Component("chat")
@RequiredArgsConstructor
public class ChatFactory implements AppFactory {
	private final Map<String, ChatAppHandler> chatAppHandlerMap;
	
	@Override
	public CommonAppHandler getHandler(String operation) {
		return chatAppHandlerMap.get(operation);
	}
}
